var moveZeroes = function (nums) {
  let j = 0;
  for (let i = 0; i < nums.length; i++) {
    if (nums[i] !== 0) {
      console.log(nums);
      nums[j++] = nums[i];
      console.log(nums);
    }
  }
  let len = nums.length - j;
  for (let i = 0; i < len; i++) {
    nums[j++] = 0;
  }
};
